package com.lapelife.backend.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lapelife.backend.common.ResponseResult;
import com.lapelife.backend.model.domain.Post;
import com.lapelife.backend.model.domain.PostUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lapelife.backend.model.request.PageRequest;

import java.util.List;
import java.util.Map;

/**
* @author Mir.Lliao
* @description 针对表【t_post_user(文章用户关联表)】的数据库操作Service
* @createDate 2023-05-07 20:04:08
*/
public interface PostUserService extends IService<PostUser> {

    ResponseResult<String> thumbs(String flag, Long id);

    ResponseResult<String> collect(String flag, Long id);

    ResponseResult<String> look(Long id);

    ResponseResult<Integer> getNum(String key, Long id);

    ResponseResult<Page<Long>> findPostIdListByCollect(PageRequest pageRequest);

    ResponseResult<Page<Long>> findPostIdListByLook(PageRequest pageRequest);

    ResponseResult<Map<String,Integer>> getAllNum(Long id);

    void addUserPostInfoToRedis(Long id);
}
